Skip to content

Conversation

@ECWireless
Copy link
Collaborator

This pull request makes a minor update to the vote button useHandleTransaction logic to ensure that the correct choice name is displayed in the transaction confirmation modal.

  • Updated the mapping for choice names in governance polls so that 0 now maps to "Yes" and 1 to "No", aligning with the expected order for PollChoice.

Copilot AI review requested due to automatic review settings January 14, 2026 15:50
@vercel
Copy link

vercel bot commented Jan 14, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
explorer-arbitrum-one Ready Ready Preview, Comment Jan 14, 2026 3:51pm

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes a bug in the vote confirmation modal where governance poll choices were mapped incorrectly. The mapping for poll choices has been corrected so that choiceId 0 now displays "Yes" and choiceId 1 displays "No" in the transaction confirmation, aligning with the actual vote buttons and the PollChoice enum.

Changes:

  • Updated the poll choice name mapping in the VoteButton's useHandleTransaction hook from { 0: "No", 1: "Yes" } to { 0: "Yes", 1: "No" }
  • Added clarifying comments distinguishing between TreasuryVoteSupport (for treasury proposals) and PollChoice (for governance polls)

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@ECWireless ECWireless requested a review from Jipperism January 14, 2026 15:54
@ECWireless ECWireless moved this from Backlog to In Review in Explorer Revamp Jan 14, 2026
@ECWireless ECWireless requested a review from mehrdadmms January 14, 2026 17:47
@github-project-automation github-project-automation bot moved this from In Review to Todo in Explorer Revamp Jan 14, 2026
@mehrdadmms mehrdadmms merged commit 11f9406 into main Jan 14, 2026
12 checks passed
@mehrdadmms mehrdadmms deleted the fix/governance-poll-vote-choice-id-confirmation-text branch January 14, 2026 17:51
@github-project-automation github-project-automation bot moved this from Todo to Done in Explorer Revamp Jan 14, 2026
@mehrdadmms
Copy link
Collaborator

@Jipperism
I approved and merged this PR but there might be a potential future issue.
Is this component re used in both treasury and governance voting, and do they have distinct 0/1 yes/no values? They use different frameworks under the hood. So might be worth double checking that just to ensure that fixing it for governance didn’t break treasury messaging

@ECWireless
Copy link
Collaborator Author

@Jipperism I approved and merged this PR but there might be a potential future issue. Is this component re used in both treasury and governance voting, and do they have distinct 0/1 yes/no values? They use different frameworks under the hood. So might be worth double checking that just to ensure that fixing it for governance didn’t break treasury messaging

The component is re-used, but the logic for treasury proposals is separate and looks correct already: https://github.com/livepeer/explorer/blob/main/components/VoteButton/index.tsx#L69

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants